﻿using System.Windows;
using DSLPedProjectWizard.ViewModels;
using DSLPedProjectWizard.Views;
using GalaSoft.MvvmLight.Messaging;

namespace DSLPedProjectWizard
{
    /// <summary>
    /// Interaction logic for MainWizardWindow.xaml
    /// </summary>
    public partial class MainWizardWindow
    {
        private MainWizardWindowViewModel model;

        public MainWizardWindow()
        {
            InitializeComponent();

            var messenger = new Messenger();
            model = new MainWizardWindowViewModel(new IntroWizardView(messenger), new SettingsWizardView(messenger), messenger);
            this.DataContext = model;
        }

        private void CancelButton_OnClick(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            this.Close();
        }

        private void FinishButton_OnClick(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }

        /// <summary>
        /// Gets the name of language
        /// </summary>
        public string LanguageName
        {
            get
            {
                return model.LanguageName;
            }
        }

        /// <summary>
        /// Gets the default xml namespace of the language
        /// </summary>
        public string LanguageXmlNamespace
        {
            get
            {
                return model.LanguageXmlNamespace;
            }
        }

        /// <summary>
        /// Gets the brief description of language
        /// </summary>
        public string LanguageDescription
        {
            get
            {
                return model.LanguageDescription;
            }
        }
    }
}
